<xs:schema targetNamespace="urn:nhibernate-mapping-2.2" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:nhibernate-mapping-2.2" elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="any">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="meta-value" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="id-type" use="required" type="xs:string" />
			<xs:attribute name="meta-type" type="xs:string" />
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="insert" default="true" type="xs:boolean" />
			<xs:attribute name="update" default="true" type="xs:boolean" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean" />
			<xs:attribute name="lazy" default="false" type="xs:boolean" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="array">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="index" />
					<xs:element ref="list-index" />
				</xs:choice>
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="subselect" type="xs:string" />
			<xs:attribute name="inverse" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="mutable" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="element-class" type="xs:string" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="where" type="xs:string" />
			<xs:attribute name="batch-size" type="xs:int" />
			<xs:attribute name="outer-join" type="outerJoinStrategy">
			</xs:attribute>
			<xs:attribute name="fetch" type="collectionFetchMode">
			</xs:attribute>
			<xs:attribute name="persister" type="xs:string" />
			<xs:attribute name="collection-type" type="xs:string" />
			<xs:attribute name="check" type="xs:string" />
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="embed-xml" default="true" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="bag">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
		</xs:complexType>
	</xs:element>
	<xs:element name="cache">
		<xs:complexType>
			<xs:attribute name="usage" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="read-only" />
						<xs:enumeration value="read-write" />
						<xs:enumeration value="nonstrict-read-write" />
						<xs:enumeration value="transactional" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="region" type="xs:string" use="optional">
			</xs:attribute>
			<xs:attribute name="include" default="all">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="all" />
						<xs:enumeration value="non-lazy" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="class">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="tuplizer" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice>
					<xs:element ref="id" />
					<xs:element ref="composite-id" />
				</xs:choice>
				<xs:element ref="discriminator" minOccurs="0" />
				<xs:element ref="natural-id" minOccurs="0" />
				<xs:choice minOccurs="0">
					<xs:element ref="version" />
					<xs:element ref="timestamp" />
				</xs:choice>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="properties" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:choice>
					<xs:sequence>
						<xs:element ref="join" minOccurs="0" maxOccurs="unbounded" />
						<xs:element ref="subclass" minOccurs="0" maxOccurs="unbounded" />
					</xs:sequence>
					<xs:element ref="joined-subclass" minOccurs="0" maxOccurs="unbounded" />
					<xs:element ref="union-subclass" minOccurs="0" maxOccurs="unbounded" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="resultset" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="query" />
					<xs:element ref="sql-query" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="entity-name" type="xs:string">
			</xs:attribute>
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="proxy" type="xs:string" />
			<xs:attribute name="lazy" type="xs:boolean">
			</xs:attribute>
      <xs:attribute name="schema-action" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="subselect" type="xs:string" />
			<xs:attribute name="discriminator-value" type="xs:string" />
			<xs:attribute name="mutable" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="abstract" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="polymorphism" default="implicit" type="polymorphismType">
			</xs:attribute>
			<xs:attribute name="where" type="xs:string" />
			<xs:attribute name="persister" type="xs:string" />
			<xs:attribute name="dynamic-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="dynamic-insert" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="batch-size" type="xs:int" />
			<xs:attribute name="select-before-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optimistic-lock" default="version" type="optimisticLockMode">
			</xs:attribute>
			<xs:attribute name="check" type="xs:string" />
			<xs:attribute name="rowid" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="collection-id">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="generator" />
			</xs:sequence>
			<xs:attribute name="column" use="required" type="xs:string" />
			<xs:attribute name="type" use="required" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
		</xs:complexType>
	</xs:element>
	<xs:element name="column">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="comment" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string">
			</xs:attribute>
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="precision" type="xs:positiveInteger" />
			<xs:attribute name="scale" type="xs:nonNegativeInteger" />
			<xs:attribute name="not-null" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique-key" type="xs:string" />
			<xs:attribute name="sql-type" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="check" type="xs:string" />
			<xs:attribute name="default" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="comment">
		<xs:complexType mixed="true">
		</xs:complexType>
	</xs:element>
	<xs:element name="component">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="tuplizer" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="parent" minOccurs="0" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="update" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="insert" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="lazy" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-element">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="parent" minOccurs="0" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="any" />
					<xs:element ref="nested-composite-element" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-id">
		<xs:annotation>
			<xs:documentation>A composite key may be modelled by a .NET class with a property for each key column. The class must be Serializable and override equals() and hashCode()</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice maxOccurs="unbounded">
					<xs:element ref="key-property" />
					<xs:element ref="key-many-to-one" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="mapped" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="unsaved-value" default="undefined" type="unsavedValueType">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-index">
		<xs:complexType>
			<xs:sequence>
				<xs:choice maxOccurs="unbounded">
					<xs:element ref="key-property" />
					<xs:element ref="key-many-to-one" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="composite-map-key">
		<xs:complexType>
			<xs:sequence>
				<xs:choice maxOccurs="unbounded">
					<xs:element ref="key-property" />
					<xs:element ref="key-many-to-one" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="create">
		<xs:complexType mixed="true">
		</xs:complexType>
	</xs:element>
	<xs:element name="database-object">
		<xs:complexType>
			<xs:sequence>
				<xs:choice>
					<xs:element ref="definition" />
					<xs:sequence>
						<xs:element ref="create" />
						<xs:element ref="drop" />
					</xs:sequence>
				</xs:choice>
				<xs:element ref="dialect-scope" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="definition">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="dialect-scope">
		<xs:complexType mixed="true">
			<xs:attribute name="name" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="discriminator">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0">
					<xs:element ref="column" />
					<xs:element ref="formula" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="type" default="string" type="xs:string" />
			<xs:attribute name="not-null" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="force" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="insert" default="true" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="drop">
		<xs:complexType mixed="true">
		</xs:complexType>
	</xs:element>
	<xs:element name="dynamic-component">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="update" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="insert" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="element">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="column" />
					<xs:element ref="formula" />
				</xs:choice>
				<xs:element ref="type" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="precision" type="xs:positiveInteger" />
			<xs:attribute name="scale" type="xs:nonNegativeInteger" />
			<xs:attribute name="not-null" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="filter">
		<xs:complexType mixed="true">
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="condition" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="filter-def">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="filter-param" />
			</xs:choice>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="condition" type="xs:string" />
      <xs:attribute name="use-many-to-one" default="true" type="xs:boolean"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="filter-param">
		<xs:complexType>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="type" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="formula">
		<xs:complexType mixed="true">
		</xs:complexType>
	</xs:element>
	<xs:element name="generator">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="hibernate-mapping">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="typedef" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="import" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="class" />
					<xs:element ref="subclass" />
					<xs:element ref="joined-subclass" />
					<xs:element ref="union-subclass" />
				</xs:choice>
				<xs:element ref="resultset" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="query" />
					<xs:element ref="sql-query" />
				</xs:choice>
				<xs:element ref="filter-def" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="database-object" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="default-cascade" default="none" type="xs:string" />
			<xs:attribute name="default-access" default="property" type="xs:string" />
			<xs:attribute name="default-lazy" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="auto-import" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="namespace" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Namespace used to find not-Fully Qualified Type Names</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="assembly" type="xs:string" use="optional">
				<xs:annotation>
					<xs:documentation>Assembly used to find not-Fully Qualified Type Names</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="id">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="type" minOccurs="0" />
				<xs:element ref="generator" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="unsaved-value" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="idbag">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="collection-id" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
		</xs:complexType>
	</xs:element>
	<xs:element name="import">
		<xs:complexType>
			<xs:attribute name="class" use="required" type="xs:string" />
			<xs:attribute name="rename" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="index">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
		</xs:complexType>
	</xs:element>
	<xs:element name="index-many-to-any">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="id-type" use="required" type="xs:string" />
			<xs:attribute name="meta-type" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="index-many-to-many">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="join">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="table" use="required" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="subselect" type="xs:string" />
			<xs:attribute name="fetch" default="join">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="join" />
						<xs:enumeration value="select" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="inverse" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optional" default="false" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="joined-subclass">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="tuplizer" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="key" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="properties" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="joined-subclass" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="resultset" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="query" />
					<xs:element ref="sql-query" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="entity-name" type="xs:string">
			</xs:attribute>
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="proxy" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="subselect" type="xs:string" />
			<xs:attribute name="dynamic-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="dynamic-insert" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="select-before-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="extends" type="xs:string" />
			<xs:attribute name="lazy" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="abstract" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="persister" type="xs:string" />
			<xs:attribute name="check" type="xs:string" />
			<xs:attribute name="batch-size" type="xs:positiveInteger" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="key">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="property-ref" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" />
			<xs:attribute name="on-delete" default="noaction" type="ondelete">
			</xs:attribute>
			<xs:attribute name="not-null" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="update" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="key-many-to-one">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" />
			<xs:attribute name="lazy" type="restrictedLaziness">
			</xs:attribute>
			<xs:attribute name="not-found" default="exception" type="notFoundMode"/>
		</xs:complexType>
	</xs:element>
	<xs:element name="key-property">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="type" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="list">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="index" />
					<xs:element ref="list-index" />
				</xs:choice>
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
		</xs:complexType>
	</xs:element>
	<xs:element name="list-index">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="column" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="base" type="xs:positiveInteger" use="optional" />
		</xs:complexType>
	</xs:element>
	<xs:element name="load-collection">
		<xs:complexType>
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-property" />
			</xs:sequence>
			<xs:attribute name="alias" use="required" type="xs:string" />
			<xs:attribute name="role" use="required" type="xs:string" />
			<xs:attribute name="lock-mode" default="read" type="lockMode">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="loader">
		<xs:complexType>
			<xs:attribute name="query-ref" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="many-to-any">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta-value" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="id-type" use="required" type="xs:string" />
			<xs:attribute name="meta-type" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="many-to-many">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="column" />
					<xs:element ref="formula" />
				</xs:choice>
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="embed-xml" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="not-found" default="exception" type="notFoundMode">
			</xs:attribute>
			<xs:attribute name="outer-join" type="outerJoinStrategy">
			</xs:attribute>
			<xs:attribute name="fetch" type="fetchMode">
			</xs:attribute>
			<xs:attribute name="lazy" type="restrictedLaziness">
			</xs:attribute>
			<xs:attribute name="foreign-key" type="xs:string" />
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="where" type="xs:string" />
			<xs:attribute name="order-by" type="xs:string" />
			<xs:attribute name="property-ref" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="many-to-one">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
        <xs:choice minOccurs="0" maxOccurs="unbounded">
          <xs:element ref="column" />
          <xs:element ref="formula" />
        </xs:choice>
      </xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="not-null" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique-key" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="outer-join" type="outerJoinStrategy">
			</xs:attribute>
			<xs:attribute name="fetch" type="fetchMode">
			</xs:attribute>
			<xs:attribute name="update" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="insert" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="foreign-key" type="xs:string" />
			<xs:attribute name="property-ref" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="lazy" type="laziness">
			</xs:attribute>
			<xs:attribute name="not-found" default="exception" type="notFoundMode">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="embed-xml" default="true" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="map">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="map-key" />
					<xs:element ref="composite-map-key" />
					<xs:element ref="map-key-many-to-many" />
					<xs:element ref="index" />
					<xs:element ref="composite-index" />
					<xs:element ref="index-many-to-many" />
					<xs:element ref="index-many-to-any" />
				</xs:choice>
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
			<xs:attribute name="sort" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="map-key">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="column" />
					<xs:element ref="formula" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="type" use="required" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="map-key-many-to-many">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="column" />
					<xs:element ref="formula" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="foreign-key" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="meta">
		<xs:complexType mixed="true">
			<xs:attribute name="attribute" use="required" type="xs:string" />
			<xs:attribute name="inherit" default="true" type="xs:boolean" />
		</xs:complexType>
	</xs:element>
	<xs:element name="meta-value">
		<xs:complexType>
			<xs:attribute name="value" use="required" type="xs:string" />
			<xs:attribute name="class" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="natural-id">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="mutable" default="false" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="nested-composite-element">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="parent" minOccurs="0" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="any" />
					<xs:element ref="nested-composite-element" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="one-to-many">
		<xs:complexType>
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="not-found" default="exception" type="notFoundMode">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="embed-xml" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="entity-name" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="one-to-one">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="formula" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="cascade" type="xs:string" />
			<xs:attribute name="outer-join" type="outerJoinStrategy">
			</xs:attribute>
			<xs:attribute name="fetch" type="fetchMode">
			</xs:attribute>
			<xs:attribute name="constrained" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="foreign-key" type="xs:string" />
			<xs:attribute name="property-ref" type="xs:string" />
			<xs:attribute name="lazy" type="laziness">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="embed-xml" default="true" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="param">
		<xs:complexType mixed="true">
			<xs:attribute name="name" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="parent">
		<xs:complexType>
			<xs:attribute name="name" use="required" type="xs:string" />
      <xs:attribute name="access" type="xs:string" />
    </xs:complexType>
	</xs:element>
	<xs:element name="primitive-array">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="index" />
					<xs:element ref="list-index" />
				</xs:choice>
				<xs:element ref="element" />
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string">
			</xs:attribute>
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="subselect" type="xs:string" />
			<xs:attribute name="mutable" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="where" type="xs:string" />
			<xs:attribute name="batch-size" type="xs:positiveInteger" />
			<xs:attribute name="outer-join">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="true" />
						<xs:enumeration value="false" />
						<xs:enumeration value="auto" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="fetch">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="join" />
						<xs:enumeration value="select" />
						<xs:enumeration value="subselect" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="persister" type="xs:string" />
			<xs:attribute name="collection-type" type="xs:string" />
			<xs:attribute name="check" type="xs:string" />
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="embed-xml" default="true" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="properties">
		<xs:complexType>
			<xs:sequence>
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="insert" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="update" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="property">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="column" />
					<xs:element ref="formula" />
				</xs:choice>
				<xs:element ref="type" minOccurs="0" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="length" type="xs:positiveInteger" />
			<xs:attribute name="precision" type="xs:positiveInteger" />
			<xs:attribute name="scale" type="xs:nonNegativeInteger" />
			<xs:attribute name="not-null" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="unique-key" type="xs:string" />
			<xs:attribute name="index" type="xs:string" />
			<xs:attribute name="update" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="insert" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="formula" type="xs:string" />
			<xs:attribute name="lazy" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="generated" default="never" type="propertyGeneration">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="query">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="query-param" />
			</xs:choice>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="flush-mode" type="flushMode">
			</xs:attribute>
			<xs:attribute name="cacheable" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="cache-region" type="xs:string" />
			<xs:attribute name="fetch-size" type="xs:int" />
			<xs:attribute name="timeout" type="xs:positiveInteger" />
			<xs:attribute name="cache-mode" type="cacheMode">
			</xs:attribute>
			<xs:attribute name="read-only" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="comment" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="query-param">
		<xs:complexType>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="type" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="resultset">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-scalar" />
				<xs:element ref="return" />
				<xs:element ref="return-join" />
				<xs:element ref="load-collection" />
			</xs:choice>
			<xs:attribute name="name" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="return-discriminator" minOccurs="0" maxOccurs="1" />
				<xs:element ref="return-property" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="alias" type="xs:string" />
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="class" type="xs:string" />
			<xs:attribute name="lock-mode" default="read" type="lockMode">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="return-column">
		<xs:complexType>
			<xs:attribute name="name" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-discriminator">
		<xs:complexType>
			<xs:attribute name="column" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-join">
		<xs:complexType>
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-property" />
			</xs:sequence>
			<xs:attribute name="alias" use="required" type="xs:string" />
			<xs:attribute name="property" use="required" type="xs:string" />
			<xs:attribute name="lock-mode" default="read" type="lockMode">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="return-property">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="return-column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="return-scalar">
		<xs:complexType>
			<xs:attribute name="column" use="required" type="xs:string" />
			<xs:attribute name="type" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="set">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="cache" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="key" />
				<xs:choice>
					<xs:element ref="element" />
					<xs:element ref="one-to-many" />
					<xs:element ref="many-to-many" />
					<xs:element ref="composite-element" />
					<xs:element ref="many-to-any" />
				</xs:choice>
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="sql-delete-all" minOccurs="0" />
				<xs:element ref="filter" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attributeGroup ref="baseCollectionAttributes" />
			<xs:attribute name="sort" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="sql-delete" type="customSQL">
	</xs:element>
	<xs:element name="sql-delete-all" type="customSQL">
	</xs:element>
	<xs:element name="sql-insert" type="customSQL">
	</xs:element>
	<xs:element name="sql-query">
		<xs:complexType mixed="true">
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="return-scalar" />
				<xs:element ref="return" />
				<xs:element ref="return-join" />
				<xs:element ref="load-collection" />
				<xs:element ref="synchronize" />
				<xs:element ref="query-param" />
			</xs:choice>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="resultset-ref" type="xs:string" />
			<xs:attribute name="flush-mode" type="flushMode">
			</xs:attribute>
			<xs:attribute name="cacheable" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="cache-region" type="xs:string" />
			<xs:attribute name="fetch-size" type="xs:int" />
			<xs:attribute name="timeout" type="xs:positiveInteger" />
			<xs:attribute name="cache-mode" type="cacheMode">
			</xs:attribute>
			<xs:attribute name="read-only" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="comment" type="xs:string" />
			<xs:attribute name="callable" default="false" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="sql-update" type="customSQL">
	</xs:element>
	<xs:element name="subclass">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="tuplizer" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="join" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subclass" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="resultset" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="query" />
					<xs:element ref="sql-query" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="proxy" type="xs:string" />
			<xs:attribute name="discriminator-value" type="xs:string" />
			<xs:attribute name="dynamic-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="dynamic-insert" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="select-before-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="extends" type="xs:string" />
			<xs:attribute name="lazy" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="abstract" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="persister" type="xs:string" />
			<xs:attribute name="batch-size" type="xs:positiveInteger" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="subselect">
		<xs:complexType mixed="true">
		</xs:complexType>
	</xs:element>
	<xs:element name="synchronize">
		<xs:complexType>
			<xs:attribute name="table" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="timestamp">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="unsaved-value">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="null" />
						<xs:enumeration value="undefined" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="source" default="vm">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="vm" />
						<xs:enumeration value="db" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="generated" default="never" type="versionGeneration">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="tuplizer">
		<xs:complexType>
			<xs:attribute name="entity-mode">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="poco" />
						<xs:enumeration value="xml" />
						<xs:enumeration value="dynamic-map" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="class" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="type">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="typedef">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="param" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="class" use="required" type="xs:string" />
			<xs:attribute name="name" use="required" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="union-subclass">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="subselect" minOccurs="0" />
				<xs:element ref="synchronize" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="comment" minOccurs="0" />
				<xs:element ref="tuplizer" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="property" />
					<xs:element ref="many-to-one" />
					<xs:element ref="one-to-one" />
					<xs:element ref="component" />
					<xs:element ref="dynamic-component" />
					<xs:element ref="properties" />
					<xs:element ref="any" />
					<xs:element ref="map" />
					<xs:element ref="set" />
					<xs:element ref="list" />
					<xs:element ref="bag" />
					<xs:element ref="idbag" />
					<xs:element ref="array" />
					<xs:element ref="primitive-array" />
				</xs:choice>
				<xs:element ref="union-subclass" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="loader" minOccurs="0" />
				<xs:element ref="sql-insert" minOccurs="0" />
				<xs:element ref="sql-update" minOccurs="0" />
				<xs:element ref="sql-delete" minOccurs="0" />
				<xs:element ref="resultset" minOccurs="0" maxOccurs="unbounded" />
				<xs:choice minOccurs="0" maxOccurs="unbounded">
					<xs:element ref="query" />
					<xs:element ref="sql-query" />
				</xs:choice>
			</xs:sequence>
			<xs:attribute name="entity-name" type="xs:string" />
			<xs:attribute name="name" type="xs:string" />
			<xs:attribute name="proxy" type="xs:string" />
			<xs:attribute name="table" type="xs:string" />
			<xs:attribute name="schema" type="xs:string" />
			<xs:attribute name="catalog" type="xs:string" />
			<xs:attribute name="subselect" type="xs:string" />
			<xs:attribute name="dynamic-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="dynamic-insert" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="select-before-update" default="false" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="extends" type="xs:string" />
			<xs:attribute name="lazy" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="abstract" type="xs:boolean">
			</xs:attribute>
			<xs:attribute name="persister" type="xs:string" />
			<xs:attribute name="check" type="xs:string" />
			<xs:attribute name="batch-size" type="xs:positiveInteger" />
			<xs:attribute name="node" type="xs:string" />
		</xs:complexType>
	</xs:element>
	<xs:element name="version">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="meta" minOccurs="0" maxOccurs="unbounded" />
				<xs:element ref="column" minOccurs="0" maxOccurs="unbounded" />
			</xs:sequence>
			<xs:attribute name="name" use="required" type="xs:string" />
			<xs:attribute name="node" type="xs:string" />
			<xs:attribute name="access" type="xs:string" />
			<xs:attribute name="column" type="xs:string" />
			<xs:attribute name="type" default="Int32" type="xs:string" />
			<xs:attribute name="unsaved-value" type="xs:string">
				<xs:annotation>
					<xs:documentation>undefined|any|none|null|0|-1|... </xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="generated" default="never" type="versionGeneration">
			</xs:attribute>
			<xs:attribute name="insert" type="xs:boolean">
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:simpleType name="outerJoinStrategy">
		<xs:restriction base="xs:string">
			<xs:enumeration value="auto" />
			<xs:enumeration value="true" />
			<xs:enumeration value="false" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="collectionFetchMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="select" />
			<xs:enumeration value="join" />
			<xs:enumeration value="subselect" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="collectionLazy">
		<xs:restriction base="xs:string">
			<xs:enumeration value="true" />
			<xs:enumeration value="false" />
			<xs:enumeration value="extra" />
		</xs:restriction>
	</xs:simpleType>
	<xs:attributeGroup name="baseCollectionAttributes">
		<xs:attribute name="name" use="required" type="xs:string" />
		<xs:attribute name="access" type="xs:string" />
		<xs:attribute name="table" type="xs:string" />
		<xs:attribute name="schema" type="xs:string" />
		<xs:attribute name="catalog" type="xs:string" />
		<xs:attribute name="subselect" type="xs:string" />
		<xs:attribute name="lazy" type="collectionLazy">
		</xs:attribute>
		<xs:attribute name="inverse" default="false" type="xs:boolean">
		</xs:attribute>
		<xs:attribute name="mutable" default="true" type="xs:boolean">
		</xs:attribute>
		<xs:attribute name="cascade" type="xs:string" />
		<xs:attribute name="order-by" type="xs:string" />
		<xs:attribute name="where" type="xs:string" />
		<xs:attribute name="batch-size" type="xs:int" />
		<xs:attribute name="outer-join" type="outerJoinStrategy">
		</xs:attribute>
		<xs:attribute name="fetch" type="collectionFetchMode">
		</xs:attribute>
		<xs:attribute name="persister" type="xs:string" />
		<xs:attribute name="collection-type" type="xs:string" />
		<xs:attribute name="check" type="xs:string" />
		<xs:attribute name="optimistic-lock" default="true" type="xs:boolean">
		</xs:attribute>
		<xs:attribute name="node" type="xs:string" />
		<xs:attribute name="embed-xml" default="true" type="xs:boolean">
		</xs:attribute>
		<xs:attribute name="generic" type="xs:boolean" use="optional">
			<xs:annotation>
				<xs:documentation>The concrete collection should use a generic version or an object-based version.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:simpleType name="optimisticLockMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="none" />
			<xs:enumeration value="version" />
			<xs:enumeration value="dirty" />
			<xs:enumeration value="all" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="polymorphismType">
		<xs:annotation>
			<xs:documentation>Types of polymorphism</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="implicit" />
			<xs:enumeration value="explicit" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="unsavedValueType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="undefined" />
			<xs:enumeration value="any" />
			<xs:enumeration value="none" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="ondelete">
		<xs:restriction base="xs:string">
			<xs:enumeration value="cascade" />
			<xs:enumeration value="noaction" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="restrictedLaziness">
		<xs:restriction base="xs:string">
			<xs:enumeration value="false" />
			<xs:enumeration value="proxy" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="lockMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="none" />
			<xs:enumeration value="read" />
			<xs:enumeration value="upgrade" />
			<xs:enumeration value="upgrade-nowait" />
			<xs:enumeration value="write" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="notFoundMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="ignore" />
			<xs:enumeration value="exception" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="fetchMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="select" />
			<xs:enumeration value="join" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="laziness">
		<xs:restriction base="xs:string">
			<xs:enumeration value="false" />
			<xs:enumeration value="proxy" />
			<xs:enumeration value="no-proxy" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="propertyGeneration">
		<xs:restriction base="xs:string">
			<xs:enumeration value="never" />
			<xs:enumeration value="insert" />
			<xs:enumeration value="always" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="flushMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="auto" />
			<xs:enumeration value="never" />
			<xs:enumeration value="always" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="cacheMode">
		<xs:restriction base="xs:string">
			<xs:enumeration value="get" />
			<xs:enumeration value="ignore" />
			<xs:enumeration value="normal" />
			<xs:enumeration value="put" />
			<xs:enumeration value="refresh" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="customSQLCheck">
		<xs:restriction base="xs:string">
			<xs:enumeration value="none" />
			<xs:enumeration value="rowcount" />
			<xs:enumeration value="param" />
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="customSQL" mixed="true">
		<xs:attribute name="callable" type="xs:boolean" />
		<xs:attribute name="check" type="customSQLCheck" use="optional" />
	</xs:complexType>
	<xs:simpleType name="versionGeneration">
		<xs:restriction base="xs:string">
			<xs:enumeration value="never" />
			<xs:enumeration value="always" />
		</xs:restriction>
	</xs:simpleType>
</xs:schema>